package com.kabao.javafx.fontdemo;

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.layout.BorderPane;
import javafx.scene.text.Font;
import javafx.stage.Stage;


public class FxIconFontApp extends Application {
    public static void main(String[] args) {
        launch(args);
    }

    @Override
    public void start(Stage pirmaryStage) throws Exception {
        testIconFont(pirmaryStage);
    }


    //测试字体
    public void testIconFont(Stage pirmaryStage){
        //Stage 舞台
        Label label =new Label("Hell 123 ! \ue600;");

        label.setFont(Font.loadFont(getClass().getResourceAsStream("/font/tq.ttf"),35));
        pirmaryStage.setScene(new Scene(new BorderPane(label),520,380));
        pirmaryStage.setTitle("Fx icon font App");
        pirmaryStage.show();
    }

}